import React from "react";

import { Redirect } from "react-router-dom";

const GHDiscover = React.lazy(_ => import('../pages/discover/index'))
const GHMine = React.lazy(_ => import('../pages/mine'))
const GHFriend = React.lazy(_ => import('../pages/friend'))
const GHRecommend = React.lazy(_ => import('../pages/discover/pages/recommend'))
const GHArtist = React.lazy(_ => import('../pages/discover/pages/artist'))

export default [
  {
    path: "/",
    exact: true,
    render: () => (
      <Redirect to="/discover" />
    )
  },
  {
    path: '/discover',
    component: GHDiscover,
    routes: [
      {
        path: "/discover",
        exact: true,
        render: () => (
          <Redirect to={"/discover/artist"} />
        )
      },
      {
        path: "/discover/artist",
        component: GHArtist
      },
      {
        path: "/discover/recommend",
        component: GHRecommend
      }
    ]
  },
  {
    path: '/mine',
    component: GHMine
  },
  {
    path: '/friend',
    component: GHFriend
  }
]